package cn.wolfcode.myenum;

/**
 * @author 杨兴健
 * @Date 2020/7/25 1:32
 */
public enum MessageEnum {
    /***/
    YUE("年份", "DATE_FORMAT(c.input_time, '%Y')"),
    MUE("月份", "DATE_FORMAT(c.input_time, '%Y-%m')"),
    DAY("日期", "DATE_FORMAT(c.input_time, '%Y-%m-%d')");

    private String name;
    private String value;

    MessageEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public static String getTypeName(String str) {
        MessageEnum[] enums = values();
        for (MessageEnum m : enums) {
            if (m.value.equals(str)) {
                return m.name;
            }
        }
        return "员工";
    }
}
